package com.usian.user.controller;

import com.usian.model.user.pojos.ApUser;
import com.usian.user.ApUserControllerApi;
import com.usian.user.mapper.ApUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/user")
public class ApUserController implements ApUserControllerApi {

    @Autowired
    private ApUserMapper apUserMapper;

    /**
     * 根据id查询app用户信息，评论服务远程调用
     *
     * @param id
     * @return
     */
    @GetMapping("/findById")
    @Override
    public ApUser findById(Integer id) {
        ApUser apUser = apUserMapper.selectById(id);
        return apUser;
    }
}
